package com.zb.vo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.zb.annotation.NumberPattern;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.List;

/**
 * @Author WEN
 * @Date 2023/9/27 0027
 **/
@Data
@ApiModel("工单客服分派策略对象")
public class WorkClientStrategyVo {
    @ApiModelProperty(value = "客服分配规则ID，新增不必传，修改必传")
    private Long id;

    @NotBlank(message = "规则名称不能为空")
    @Length(max = 20, message = "规格名称长度限制 20 个字符以内")
    @ApiModelProperty(value = "规则名称", required = true)
    private String name;

    @ApiModelProperty(value = "优先级", example = "0")
    private Integer weight;

    @NotNull(message = "分配方式不能为空")
    @NumberPattern(regexp = "^(1|2|3)$", message = "分配方式参数不合法")
    @ApiModelProperty(value = "分配方式：1-平均分配，2-随机分配，3-熟客优先", required = true, example = "1")
    private Integer type;

    @ApiModelProperty(value = "人员类型：1-客服，2-客服组", required = true, example = "0")
    private Integer empType;

    @NotNull(message = "状态不能为空")
    @ApiModelProperty(value = "状态：false-启用，true-禁用", required = true, example = "false")
    private Boolean status;

    @NotNull(message = "规则条件不能为空")
    @NotEmpty(message = "规则条件不能为空")
    @Size(min = 1, message = "规则条件至少填写一项")
    @ApiModelProperty(value = "工单客服分派策略条件对象", required = true)
    private List<WorkClientStrategyConditionVo> conditionVos;

    @ApiModelProperty(value = "删除工单客服分派策略条件对象ID")
    private List<Long> delConditionIds;

    @ApiModelProperty(value = "客服ID/客服组ID对象")
    private List<Long> serviceIds;


}
